package com.weeho.dongyong.dao;

import com.weeho.dongyong.entity.Task;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TaskDao extends BaseDao {
    public int insertSelective(Task record) {
        return sqlSession.insert("insertTaskByPrimaryKey", record);
    }

    public int updateByPrimaryKeySelective(Task record) {
        return sqlSession.update("updateTaskByPrimaryKeySelective", record);
    }

    public int deleteByPrimaryKey(String id) {
        return sqlSession.update("deleteTaskByPrimaryKey", id);
    }

    public Task selectByPrimaryKey(String id) {
        return sqlSession.selectOne("selectTaskByPrimaryKey", id);
    }

    public List<Task> selectByCondition(Task record) {
        return sqlSession.selectList("selectTaskByCondition", record);
    }
}